package com.yunhui.mapper;

import com.yunhui.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author WGH
 * @since 2019-12-09
 */
public interface UserMapper extends BaseMapper<User> {

    //根据手机号或者邮箱查询
    User selectByPhoneOrEmail(@PathVariable("phone") String phone, @PathVariable("email") String email);

    //列表分页
    List<User> listByPage(@PathVariable("index") int index, @PathVariable("size") int size, @PathVariable("begin")
            String begin, @PathVariable("end") String end, @PathVariable("phone") String phone, @PathVariable("email") String email);

    //查询数据总数
    int countByPage(@PathVariable("begin") String begin, @PathVariable("end") String end,
                    @PathVariable("phone") String phone, @PathVariable("email") String email);

}
